/*
	简单计时
*/
function mycheckTime(i) {
    if(i < 10) 
        i = "0"+i;
    return i;
}

function beginTime() {
    seconds++;
    seconds = mycheckTime(seconds);

    if(seconds >= 60) {
        minutes++;
        seconds %= 60; 
        minutes = mycheckTime(minutes);
    }   

    if(minutes >= 60) {
        hours++;
        minutes %= 60; 
        hours = mycheckTime(hours);
    }   

    document.getElementById("time").innerHTML = hours+':'+minutes+':'+seconds;
    t = setTimeout("beginTime()", 1000);
}

function suspendTime() {
    clearTimeout(t);
}

function stopTime() {
    seconds = '00';
    minutes = '00';
    hours = '00';
    document.getElementById("time").innerHTML = "00:00:00";
    clearTimeout(t);
}

